//
//  ZDQAddressTableViewCell.m
//  CoreDataAddressBook
//
//  Created by dllo on 15/11/20.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ZDQAddressTableViewCell.h"

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation ZDQAddressTableViewCell

- (void)dealloc {
    
    [_nameLabel release];
    [_sexLabel release];
    [_numberLabel release];
    [super dealloc];
    
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self create];
        
    }
    
    return self;
    
}



- (void)create {
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.nameLabel];
//    self.nameLabel.layer.borderWidth = 1;
    [_nameLabel release];
    
    self.sexLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.sexLabel];
//    self.sexLabel.layer.borderWidth = 1;
    [_sexLabel release];
    
    self.numberLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.numberLabel];
//    self.numberLabel.layer.borderWidth = 1;
    [_numberLabel release];
    
    
}


- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    self.nameLabel.frame = CGRectMake(10, 10, WIDTH - 20, HEIGHT / 3 - 15);
    self.sexLabel.frame = CGRectMake(10, HEIGHT / 3 + 5, WIDTH - 20, HEIGHT / 3 - 15);
    self.numberLabel.frame = CGRectMake(10, HEIGHT / 3 * 2 + 5, WIDTH - 20, HEIGHT / 3 - 15);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
